﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using DLL;

public partial class examKnow : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //获取已发布试卷信息
            BindExamPaper();
            //获取考生信息
            GetKaoShenInfo();
        }
    }

    //获取已发布的试卷
    private void BindExamPaper()
    {
        dropPaper.DataSource = examDesign_BLL.GetFaBuExamPaper();
        dropPaper.DataTextField = "examName";
        dropPaper.DataValueField = "examNum";
        dropPaper.DataBind();
    }

    //获取考生信息
    private void GetKaoShenInfo()
    {
        landInfo info = (landInfo)Session["landInfo"];
        object obj = xs_BLL.GetXSInfo(info.UserId);       
        fvXS.DataSource = obj;
        fvXS.DataBind();
    }

    //当点击开始考试时跳转页面
    protected void btnStart_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("<script type='text/javascript' language='javascript'>location.href='examing.aspx?examNum=" + dropPaper.SelectedValue + "'</script>");
    }
}
